package com.wh.system.dao;

import cn.hutool.db.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.org.pojo.Employee;
import com.wh.system.pojo.Menu;
import com.wh.system.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface RoleDao extends BaseMapper<Role> {
    //在RoleMapper中添加根据员工查询角色ID的方法

    /**
     * 根据员工Id，查询员工所属角色ID
     * @param employeeId 员工id
     * @return
     */
    List<Long> FindRoleIdByEmployeeId(Long employeeId);

    List<Role> findByPage(@Param("page") IPage<Role> page, @Param("ew") QueryWrapper<Role> qw);


}

